package com.exam.api.modules.exampaper.controller.manager;

import com.exam.api.common.web.TinyResponse;
import com.exam.api.modules.exampaper.mapper.TblExamPaperStatisticsMapper;
import com.exam.api.modules.exampaper.vo.ExamPaperStatisticsVO;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * (管理端) 试卷主表相关接口
 */
@Tag(name = "(管理端) 试卷主表相关接口", description = "(管理端) 试卷主表相关接口")
@RestController
@RequestMapping("/manager/exam-paper/statistics")
@TinyResponse
public class TblExamPaperStatisticsManagerController {

    @Resource
    private TblExamPaperStatisticsMapper examPaperStatisticsMapper;

    @PostMapping("/01")
    public List<ExamPaperStatisticsVO> s01() {
        return examPaperStatisticsMapper.selectStatistics01();
    }

    @PostMapping("/t")
    public ExamPaperStatisticsVO t() {
        return examPaperStatisticsMapper.selectStatisticsT();
    }


    @PostMapping("/02/{paperId}")
    public List<ExamPaperStatisticsVO> s01(@PathVariable("paperId") Long paperId) {
        return examPaperStatisticsMapper.selectStatistics02(paperId);
    }

}